
// import haxe.ds.Array;

/**
 * numberernal class
 */

export class BoundaryBuildInfo {
	size: number; // dimension

	numBounded: number;
	iBounded: Array<number>;   // indices
	signs: Array<number>;      // signs

	numUnbounded: number;
	iUnbounded: Array<number>; // indices

	// numBounded + numUnbounded <= n

	constructor(size: number) {
		this.size = size;
		this.numBounded = 0;
		this.iBounded = new Array<number>(size);
		this.signs = new Array<number>(size);
		this.numUnbounded = 0;
		this.iUnbounded = new Array<number>(size);
	}


	public clear(): void {
		this.numBounded = 0;
		this.numUnbounded = 0;
	}


	public pushBounded(idx: number, sign: number): void {
		this.iBounded[this.numBounded] = idx;
		this.signs[this.numBounded] = sign;
		this.numBounded++;
	}


	public pushUnbounded(idx: number): void {
		this.iUnbounded[this.numUnbounded] = idx;
		this.numUnbounded++;
	}


	public popBounded(): void {
		this.numBounded--;
	}


	public popUnbounded(): void {
		this.numUnbounded--;
	}

}
